package LeetCode;

public class LC_334_IncreasingTripletSubsequence {

    public static void main(String[] args) {

    }

    static class Solution {
        public boolean increasingTriplet(int[] nums) {
            int x = Integer.MAX_VALUE;
            int y = Integer.MAX_VALUE;
            for (int z : nums) {
                if (x >= z)
                    x = z;
                else if (y >= z)
                    y = z;
                else
                    return true;
            }
            return false;
        }

    }
}